<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="css/css.css">
    <link rel="stylesheet" href="css/style.css">
    <script src="http://apps.bdimg.com/libs/jquery/1.10.1/jquery.min.js"></script>
    <script type="text/javascript">
        !window.jQuery && document.write('<script src="js/jquery.min.js"><\/script>');
    </script>
    <script src="js/public.js"></script>
    <script src="js/area.js"></script>
    <title>云中宝</title>
</head>

<body>
<div class="wrapper">
<div class="header">
    <ul class='clearfix'>
        <li class="header_title_wrapper">云中宝</li>
    </ul> 
</div>
<div class="main login_wrapper pd10">  
    <form action="">
    <div class="title">参保地：</div>
    <div class="form_item_group">
        <div class="form_item">
           <div class="form_input_wrapper w_3_3" style="border-right:1px solid #ccc">
            <select id="s_province" name="s_province" class="form_select s_province w_10"></select>
           </div>
           <div class="form_input_wrapper w_3_3" style="border-right:1px solid #ccc">    
            <select id="s_city" name="s_city" class="form_select s_city w_10"></select>
           </div>
           <div class="form_input_wrapper w_3_3">    
            <select id="s_county" name="s_county" class="form_select s_county w_10"></select>
           </div>  
        </div>
    </div>
    <div class="title">缴费基数：</div>
    <div class="form_item_group">
        <div class="form_item">
            <span class="form_label" for="">缴费基数：</span>
            <input class="form_input w_10 ss_base" id="ss_base" type="text" placeholder="基数范围在 2585 到 19389 之间">       
        </div>
        <div class="form_item errorwrap" style="display:none">
            <span class="form_text baseerror">基数范围在 2585 到 19389 之间</span>     
        </div>
    </div>
    
    <div class="form_item">
        <a class="btn btn_lg btn_round w_5" href="per_paying.html">确定</a>        
    </div>            
    </form>
</div> 
</div>
</div>
<style>
.baseerror{
    color: #f00
}
</style> 
<script>
var x = new _init_area(s,['2','22','221']);
var ssBase={minBase:2585,maxBase:19389}
document.querySelector('.ss_base').onblur=function(){
    cur_Base(ssBase)
}
function cur_Base(opts){
      var _minBase =opts.minBase;
      var _maxBase =opts.maxBase;
      var _ssBase =parseFloat(document.querySelector('.ss_base').value)
      if(_minBase <= _ssBase && _ssBase <= _maxBase){
          document.querySelector('.errorwrap').style.display='none'
          return true
          
      }else{
          document.querySelector('.errorwrap').style.display='block';
      }
     return false
  }
document.querySelector('.btn').onclick=function(){
    var s_pv = document.querySelector('.s_province').value,
        s_cy = document.querySelector('.s_city').value,
        s_cty = document.querySelector('.s_county').value,
        _base = cur_Base(ssBase)
    if(s_pv == '' || s_cy == '' || s_cty == '' || !_base){
        return false
    }
}
</script> 
</body>
</html>